package cn.smbms.controller;

import java.util.Date;
import java.text.SimpleDateFormat;

import org.springframework.beans.factory.config.CustomEditorConfigurer;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

public class BaseInitController {
	@InitBinder
	public void ininBind(WebDataBinder dataBinder) {
		System.out.println("ininBind=====================");
		dataBinder.registerCustomEditor
		(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true));
			
	}
}
	